using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PresentationManager
{
    /// <summary>
    /// Represents a windows form of ScriptPlayer
    /// </summary>
    public partial class FormAbout : Form
    {
        private static FormAbout _instance;

        /// <summary>
        /// Gets the single instance.
        /// </summary>
        /// <value>The instance.</value>
        public static FormAbout Instance
        {
            get {
                object lockobj = new object();
                if (_instance == null)
                    lock (lockobj)
                        if (_instance == null)
                            _instance = new FormAbout();

                return _instance; 
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="FormAbout"/> class.
        /// </summary>
        protected FormAbout()
        {
            InitializeComponent();
            this.Disposed += new EventHandler(FormAbout_Disposed);
        }

        /// <summary>
        /// Handles the Disposed event of the FormAbout control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void FormAbout_Disposed(object sender, EventArgs e)
        {
            _instance = new FormAbout();
        }

        /// <summary>
        /// Handles the Click event of the FormAbout control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void FormAbout_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}